package com.alvis.media.repository;

import com.alvis.media.domain.VideoInfo;
import com.alvis.media.viewmodel.video.VideoPageRequestVM;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface VideoInfoMapper extends MediaBaseMapper <VideoInfo> {


    int deleteByPrimaryKey(Integer videoId);

    int insert(VideoInfo record);

    int insertSelective(VideoInfo record);

    VideoInfo selectByPrimaryKey(Integer videoId);

    int updateByPrimaryKeySelective(VideoInfo record);

    int updateByPrimaryKey(VideoInfo record);
    /**
     * 获取新增视频数量
     * @param filter
     * @return
     */
    int selectNewVideoCount(VideoInfo filter);

    /**
     *get videoId by video url from
     * @param
     * @return
     */
    Integer selectVideoIdByUrl(String videoUrl);


    /**
     * @param requestVM requestVM
     * @return List<VideoInfo>
     */
    List <VideoInfo> videoPage(VideoPageRequestVM requestVM);

    List <VideoInfo> selectHotVideoList();
}